package ly.gupao.edu;


import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import ly.gupao.edu.thread.ExecutorProcessPool;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
@MapperScan(basePackages = "ly.gupao.edu.podcast.mapper")
@EnableScheduling
@EnableAsync
@Configuration
@EnableTransactionManagement
@ComponentScan(basePackages = "ly.gupao.edu")
public class Application {

    @RequestMapping("")
    public String test(){
        return "port: 10001";
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(Application.class, args);
    }


    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}